<%@ page language="java" isELIgnored="false" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ include file="/WEB-INF/jsp/ResourceGlobal.jsp"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>

<head>
 <!-- 这里引入导航信息header.tpl -->
 <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>信息查看</title>
<link rel="stylesheet" type="text/css" href="<%=context%>resources/modules/bootstrap/css/plugins/multiselect/multiselect.css" />
<script type="text/javascript">
var pagePath = '<%=context%>'+'privilege/privilegeUpdate/';

var length = '${fn:length(resourceInfo)}';

$(function(){
	//把访问路径传到js
	setPathPrefix(pagePath);
	//alert(length);
	
});
</script>

<style type="text/css">

</style>
</head>

<body class="sub-page">
<div class="page-content">
    <div class="page-header">
        <h4 class="page-title">信息查看</h4>
    </div>
    <div class="page-body">
         	<form name="privilegeForm" id="privilegeForm" method="post" class="form-horizontal" action="" role="form">
         	<!-- 如果将表单禁用，就给fieldset添加disabled属性 -->
			<fieldset>
         	<input type="hidden" name="roleId" id="roleId" value="${roleVo.roleId}"/>
			<input type="hidden" name="resId" id="resId" value=""/> 
			</fieldset>
	    	 </form>
	    	  <div class="table-responsive">
	            <table class="table table-bordered">
	                <colgroup>
	                    <col width="20%">
	                    <col width="30%">
	                    <col width="20%">
	                    <col width="30%">
	                </colgroup>
	                <tbody>
	                    <tr>
	                        <td>角色名称</td>
	                         <td class="white-bg">
	                         	<span>${roleVo.roleName}</span>
	                         
	                        </td>
	                        <td>角色类型</td>
	                        <td class="white-bg">
	                        	<span>${roleVo.roleTypeName}</span>
	                        </td>
	                     </tr>
	                     <tr>
	                        <td>员工姓名</td>
	                        <td class="white-bg">
	                            <c:if test="${!empty roleVo.empsName}">
									<div  style="line-height: 30px">
										<c:forEach items="${roleVo.empsName}" var="vcl">
										    <c:if test="${!empty vcl}">
												<span class="text-wrapper">${vcl}</span>
										    </c:if>
										</c:forEach>
									</div>
								</c:if>
	                        </td>
	                        <td>权限类型<span class="text-danger">*</span></td>
	                        <td class="white-bg">
		                    	<span >
									<c:if test="${roleVo.authorityType=='1'}">
		                            	<span>普通</span>
		                            </c:if>
		                            <c:if test="${roleVo.authorityType=='2'}">
		                            	<span>特殊</span>
		                            </c:if>
								</span>
	                        </td>
	                       </tr>
	                       <tr>
	                        <td>分享权限列表</td>
	                        <td colspan="3" class="white-bg">
	                        	<c:forEach var="shareItem" items="${roleShareInfo}">
									<div>&nbsp;${shareItem.roleName} &nbsp;</div>
								</c:forEach>
	                        </td>
	                    </tr>
	                    <tr>
	                        <td colspan="4" style="overflow: hidden;">
								<div class="col-sm-5">
									<div class="clearfix form-multi-col-panel">
										<div class="form-item-group form-horizontal" role="form">
										
											<div class="form-item">
												<span class="form-field">资源名称：</span>
												<span class="form-input"><input type="text" placeholder="资源名称" class="form-control" name="resName" id="resName" ></span>
											</div>
											<div class="form-item"></div>
											<div class="form-item"></div>
											<div class="form-item"></div>
											<div class="form-item"></div>
										</div>
										
										<div class="form-action text-right">
											<button class="btn btn-primary" id="queryBtn" name="queryBtn" type="submit" onclick="queryResource(true)">
												<i class="fa fa-search"></i> 查询
											</button>
											<button class="btn btn-outline btn-default" id="resetBtn" name="resetBtn" type="reset">清空</button>
										</div>
									</div>
									<div class="jqGrid_wrapper fullscreen-wrapper">
										<table id="resourceList"></table>
										<div id="resourcePage"></div>
									</div>
								</div>
								<div class="col-sm-2 multiselect-actions" style="width:10%;">
									<a href="javascript:void(0)" class="btn btn-default btn-sm" title="全量置右" onclick="moveRight('Y');"><i class="iconfont icon-shideright39"></i></a>
				        	 		<a href="javascript:void(0)" class="btn btn-default btn-sm" title="右移" onclick="moveRight('N');"><i class="iconfont icon-jiantouarrow487"></i></a>
				        	 		<a href="javascript:void(0)" class="btn btn-default btn-sm" title="左移" onclick="moveLeft('N');"><i class="iconfont icon-jiantouarrowhead7"></i></a>
				        	 		<a href="javascript:void(0)" class="btn btn-default btn-sm" title="全量置左" onclick="moveLeft('Y');"><i class="iconfont icon-jiantouarrowheads3"></i></a>
				        	 		
				        	 		<span style="color:red;line-height: 34px;">（温馨提醒：左、右移动资源后，数据将立即保存至服务器，更新查询权限后生效。）</span>
								</div>
								<div class="col-sm-5">
									<div class="clearfix form-multi-col-panel">
										<div class="form-item-group form-horizontal" role="form">
										
											<div class="form-item">
												<span class="form-field">资源名称：</span>
												<span class="form-input"><input type="text" placeholder="资源名称" class="form-control" name="selectedResName" id="selectedResName" ></span>
											</div>
											<div class="form-item"></div>
											<div class="form-item"></div>
											<div class="form-item"></div>
											<div class="form-item"></div>
										</div>
										
										<div class="form-action text-right">
											<button class="btn btn-primary" id="queryBtn" name="queryBtn" type="submit" onclick="querySelected(true)">
												<i class="fa fa-search"></i> 查询
											</button>
											<button class="btn btn-outline btn-default" id="resetBtn" name="resetBtn" type="reset">清空</button>
										</div>
									</div>
								
									<div class="jqGrid_wrapper fullscreen-wrapper">
										<table id="selectedList"></table>
										<div id="selectedPage"></div>
									</div>
								</div>
	                        </td>
	                    </tr>
	                </tbody>
	            </table>
	            </div>
	            
			    </div>
</div>
<script type="text/javascript" src="<%=context%>resources/modules/bootstrap/js/plugins/multiselect/index.js"></script>
<script type="text/javascript" src="<%=context%>resources/modules/system/common/MapAndSet.js"></script>
<script type="text/javascript" src="<%=context%>resources/modules/system/sys/privilege.update.js?20171025"></script>
</body>
</html>
